package com.jiazhong.shixi.caichanguanli.mapper;

import com.jiazhong.shixi.caichanguanli.bean.Assets;
import com.jiazhong.shixi.caichanguanli.bean.Logs;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LogsMapper {
    @Insert("INSERT INTO logs(log_id,log_content,log_time) VALUES(#{logId},#{logContent}, #{logTime})")
    //@Options(useGeneratedKeys = true, keyProperty = "logId")
    int insert(Logs log);

    @Select("SELECT * FROM logs order by log_time desc")
    List<Logs> findByLogTime(String log_time);

    @Delete("DELETE FROM logs WHERE log_id = #{logId}")
    void deleteById(Logs sc);
}

